import '../interface/room_plugin.dart';

class RoomManager {
  static RoomManager? _instance;

  // List<RoomPlugin> plugins = <RoomPlugin>[];

  RoomManager._();

  factory RoomManager() {
    _instance ??= RoomManager._();
    return _instance!;
  }

  // void addPlugin(RoomPlugin plugin) => plugins.add(plugin);

  // bool rmPlugin(RoomPlugin plugin) => plugins.remove(plugin);

  RoomPlugin? getTemplatePlugin(/*Channel? channel */) {
    return null;
    // if (channel == null) return null;
    // return plugins.firstWhereOrNull((_) => _.support(channel)&&_.isTemplate);
  }

  // Iterable<RoomPlugin> getSupportPlugins(Channel channel) => plugins.where((_) => _.support(channel));

  static RoomManager get instance => RoomManager();
}
